package com.gwtcx.client.presenter;

import com.google.gwt.event.shared.EventBus;
import com.google.inject.Inject;
import com.gwtcx.client.smartgwt.view.handlers.ErrorPageUiHandlers;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.proxy.PlaceManager;
import com.gwtplatform.mvp.client.proxy.Proxy;
import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;

public abstract class ErrorPagePresenter<V extends View, Proxy_ extends Proxy<?>> extends Presenter<V, Proxy_> implements ErrorPageUiHandlers {
	private final PlaceManager placeManager;
	
	@Inject
	public ErrorPagePresenter(EventBus eventBus, V view, Proxy_ proxy, PlaceManager placeManager) {
		super(eventBus, view, proxy);
		
		this.placeManager = placeManager;
	}

	@Override
	protected void revealInParent() {
		RevealRootContentEvent.fire(this, this);
	}

	public PlaceManager getPlaceManager() {
	    return placeManager;
	}
	
	@Override
	public void onOkButtonClicked() {
		
	}
}
